package com.market.mapper;


import com.market.entity.Backstage;
import com.market.entity.Goods;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @ClassName BackStageMapper
 * @Description TODO
 * @Author pq
 * @Date 2022/3/28 15:45
 * @Version 1.0
 */
@Mapper
public interface BackStageMapper {
    //添加后台用户
    int addBackStageUser(Backstage backstage);

    //根据账号查询某个后台人员
    Backstage queryBackStageByAccount(String account);

    //根据id查询某个后台人员信息
    Backstage queryBackstage(int backstageId);

    //根据姓名和账号找后台用户信息
    Backstage queryBackstageByNameAndAccount(String name,String account);

    //查询所有后台人员
    List<Backstage> queryAllBackstage();

    //修改后台人员权限
    int updateRole(int backstageId, int newRole);

    //锁定后台人员
    int lockBackstage(int backstageId);

    //解锁后台人员
    int unLockBackstage(int backstageId);

    //查找所有状态为2的后台人员
    List<Backstage> queryBackstageByState();

    //删除后台人员
    boolean delBackstage(int backId);
}
